<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>商户资讯</title>
<%@ include file="/page/wx/include.jsp"%>
<script type="text/javascript" src="<%=basePath%>/statics/plugins/layer/layer.js"></script>
<script>
	$(function() {
		jQuery('.zx_nav ul li').click(function() {
			TabSelect(".zx_nav ul li", "div.zx_list", "current", jQuery(this))
		});
		jQuery('.zx_nav ul li').eq(0).trigger("click");
		jQuery('#duice').click(function() {
			jQuery('.wthpop').show();
		})
		jQuery('.wthpop>p>span').click(function() {
			jQuery('.wthpop').hide()
		})

		//tab function
		function TabSelect(tab, con, addClass, obj) {
			var jQuery_self = obj;
			var jQuery_nav = jQuery(tab);

			jQuery_nav.removeClass(addClass), jQuery_self.addClass(addClass);

			var jQuery_index = jQuery_nav.index(jQuery_self);
			var jQuery_con = jQuery(con);
			jQuery_con.hide(), jQuery_con.eq(jQuery_index).show();
		}
	});
	
	function doMessageDetail(messageId) {
		window.location.href = '<%=basePath%>/wx/wxmessage/toWxMessagePage?messageId=' + messageId;
	}
</script>
</head>
<body style="background: #f5f5f5">
	<div class="zx_nav">
		<ul>
			<li class="current"><a href="javascript:void(0)">系统通知<i></i></a></li>
			<li><a href="javascript:void(0)">订单消息<i></i></a></li>
			<li><a href="javascript:void(0)">业界动态<i></i></a></li>
		</ul>
	</div>
	<div class="zx_list">
		<div class="zx_list_con">
			<c:choose>
				<c:when test="${empty messageSystemList }">
					<div class="nomsg_part">
						<p>
							<i><img src="<%=basePath%>/statics_wx/images/icon_nocomment.png" /></i> <span>您还没有此类消息~</span>
						</p>
					</div>
				</c:when>
				<c:otherwise>
					<ul>
						<c:forEach items="${messageSystemList }" var="message">
							<li onclick="javascript: doMessageDetail('${message.id}');">
								<div class="box2">
									<div class="box2_con">
										<h1>
											<strong> 
												<c:if test="${message.isRead == 0 }"><em></em></c:if> 
												<span>${message.title }</span>
											</strong> 
											<b> 
												<c:choose>
													<c:when test="${message.date eq today }">
														<label>今天</label> ${message.time }
													</c:when>
													<c:otherwise>
														${message.date }
													</c:otherwise>
												</c:choose>
											</b>
										</h1>
										<div class="box2_con1">
											<div class="pic">
												<img src="${imgRootURL }${message.imagePath }${ossImgZoomWX}" onerror="this.src='<%=basePath%>/statics/images/default.jpg';"
													onclick="javascript: doMessageDetail('${message.id}');" />
											</div>
											<div class="item-info">
												<p>${message.title }</p>
												<h3>来自${message.creater }</h3>
											</div>
										</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</c:otherwise>
			</c:choose>
		</div>
	</div>
	<div class="zx_list">
		<div class="zx_list_con">
			<c:choose>
				<c:when test="${empty messageOrderList }">
					<div class="nomsg_part">
						<p>
							<i><img src="<%=basePath%>/statics_wx/images/icon_nocomment.png" /></i> <span>您还没有此类消息~</span>
						</p>
					</div>
				</c:when>
				<c:otherwise>
					<ul>
						<c:forEach items="${messageOrderList }" var="message">
							<li onclick="javascript: doMessageDetail('${message.id}');">
								<div class="box2">
									<div class="box2_con">
										<h1>
											<strong> 
												<c:if test="${message.isRead == 0 }"><em></em></c:if> 
												<span>${message.title }</span>
											</strong> 
											<b> 
												<c:choose>
													<c:when test="${message.date eq today }">
														<label>今天</label> ${message.time }
													</c:when>
													<c:otherwise>
														${message.date }
													</c:otherwise>
												</c:choose>
											</b>
										</h1>
										<div class="box2_con1">
											<div class="pic">
												<img src="${imgRootURL }${message.imagePath }${ossImgZoomWX}" onerror="this.src='<%=basePath%>/statics/images/default.jpg';"
													onclick="javascript: doMessageDetail('${message.id}');" />
											</div>
											<div class="item-info">
												<p>${message.title }</p>
												<h3>订单编号:${message.billCode }</h3>
											</div>
										</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</c:otherwise>
			</c:choose>
		</div>
	</div>
	<div class="zx_list">
		<div class="zx_list_con">
			<c:choose>
				<c:when test="${empty messageDynamicList }">
					<div class="nomsg_part">
						<p>
							<i><img src="<%=basePath%>/statics_wx/images/icon_nocomment.png" /></i> <span>您还没有此类消息~</span>
						</p>
					</div>
				</c:when>
				<c:otherwise>
					<ul>
						<c:forEach items="${messageDynamicList }" var="message">
							<li onclick="javascript: doMessageDetail('${message.id}');">
								<div class="box2">
									<div class="box2_con">
										<h1>
											<strong> 
												<c:if test="${message.isRead == 0 }"><em></em></c:if> 
												<span>${message.title }</span>
											</strong> 
											<b> 
												<c:choose>
													<c:when test="${message.date eq today }">
														<label>今天</label> ${message.time }
													</c:when>
													<c:otherwise>
														${message.date }
													</c:otherwise>
												</c:choose>
											</b>
										</h1>
										<div class="box2_con1">
											<div class="pic">
												<img src="${imgRootURL }${message.imagePath }${ossImgZoomWX}" onerror="this.src='<%=basePath%>/statics/images/default.jpg';"
													onclick="javascript: doMessageDetail('${message.id}');" />
											</div>
											<div class="item-info">
												<p>${message.title }</p>
												<h3>来自${message.creater }</h3>
											</div>
										</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</c:otherwise>
			</c:choose>
		</div>
	</div>
<jsp:include page="../wx_footer.jsp" />
</body>
</html>